﻿namespace LeetCode_Learn
{
    internal class Program
    {
        static void Main(string[] args)
        {
            int[] newIntArr = new int[100];

            RandomArr(newIntArr, newIntArr.Length, 0, 100);

            //Part_01MargeSort.Sort(newIntArr);

            Compare.DO(10, Part_01MargeSort.Sort, 10, 0, 100);

            //Console.WriteLine(string.Join(", ", newIntArr));
            Console.WriteLine("--------------------------");

            int[] newIntArr1 = new int[5] { 10, 5, 10, 5, 5 };
            Console.WriteLine(string.Join(", ", newIntArr1));
            Console.WriteLine(Part03_GetOneOddNumber.Get(newIntArr1));
            Console.WriteLine("--------------------------");

            int[] newIntArr2 = new int[6] { 1, 10, 10, 3, 10, 10 };
            Console.WriteLine(string.Join(", ", newIntArr2));
            Console.WriteLine(string.Join(", ", Part04_GetTwoOddNumber.Get(newIntArr2)));
            Console.WriteLine("--------------------------");

            int[] newIntArr3 = new int[7] { 1, 2, 3, 3, 3, 10, 10 };
            Console.WriteLine(Part06_BSOne.Get(newIntArr3, 3));
        }

        static void RandomArr(int[] arr, int length, int min, int max)
        {
            Random rand = new Random();
            for (int i = 0; i < length; i++)
            {
                arr[i] = rand.Next(min, max);
            }
        }
    }
}